libuthreads.a: uthreads.o translate_address.o
	ar $(ARFLAGS) libuthreads.a uthreads.o translate_address.o
	ranlib libuthreads.a

testout: uthreads.o translate_address.o
	g++ -g -Wall translate_address.o uthreads.o test.cpp -o testout

uthreads.o: uthreads.cpp scheduler.hh translate_address.hh sync_queue.hh uMap.hh
	g++ -g -Wall -c uthreads.cpp -o uthreads.o

translate_address.o: translate_address.cpp translate_address.hh
	g++ -g -Wall -c translate_address.cpp -o translate_address.o

clean:
	rm *.o *.a

tar:
	tar cvf hw2.tar README sync_queue.hh translate_address.hh uThread.hh Makefile scheduler.hh translate_address.cpp uMap.hh uthreads.cpp